package com.xszx.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 资产表
 * @TableName t_asset
 */
@TableName(value ="t_asset")
@Data
public class TAsset implements Serializable {
    /**
     * 
     */
    @TableId
    private Integer id;

    /**
     * 关联单位表字段
     */
    private Integer monadId;

    /**
     * 资产名称
     */
    private String assetName;

    /**
     * 规格型号 需唯一
     */
    private String speModels;

    /**
     * 关联一级分类表字段
     */
    private Integer oneClassifyId;

    /**
     * 关联二级分类表字段
     */
    private Integer secClassifyId;

    /**
     * 资产编号 需唯一
     */
    private String assetNumber;

    /**
     * 资产状况
     */
    private Integer assetState;

    /**
     * 现存地址
     */
    private String address;

    /**
     * 关联管理部门字段
     */
    private Integer adminDep;

    /**
     * 入账日期
     */
    private Date paymentTime;

    /**
     * 原值
     */
    private Double originalValue;

    /**
     * 净值   按照原值的5%
     */
    private Double netValue;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TAsset other = (TAsset) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getMonadId() == null ? other.getMonadId() == null : this.getMonadId().equals(other.getMonadId()))
            && (this.getAssetName() == null ? other.getAssetName() == null : this.getAssetName().equals(other.getAssetName()))
            && (this.getSpeModels() == null ? other.getSpeModels() == null : this.getSpeModels().equals(other.getSpeModels()))
            && (this.getOneClassifyId() == null ? other.getOneClassifyId() == null : this.getOneClassifyId().equals(other.getOneClassifyId()))
            && (this.getSecClassifyId() == null ? other.getSecClassifyId() == null : this.getSecClassifyId().equals(other.getSecClassifyId()))
            && (this.getAssetNumber() == null ? other.getAssetNumber() == null : this.getAssetNumber().equals(other.getAssetNumber()))
            && (this.getAssetState() == null ? other.getAssetState() == null : this.getAssetState().equals(other.getAssetState()))
            && (this.getAddress() == null ? other.getAddress() == null : this.getAddress().equals(other.getAddress()))
            && (this.getAdminDep() == null ? other.getAdminDep() == null : this.getAdminDep().equals(other.getAdminDep()))
            && (this.getPaymentTime() == null ? other.getPaymentTime() == null : this.getPaymentTime().equals(other.getPaymentTime()))
            && (this.getOriginalValue() == null ? other.getOriginalValue() == null : this.getOriginalValue().equals(other.getOriginalValue()))
            && (this.getNetValue() == null ? other.getNetValue() == null : this.getNetValue().equals(other.getNetValue()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getMonadId() == null) ? 0 : getMonadId().hashCode());
        result = prime * result + ((getAssetName() == null) ? 0 : getAssetName().hashCode());
        result = prime * result + ((getSpeModels() == null) ? 0 : getSpeModels().hashCode());
        result = prime * result + ((getOneClassifyId() == null) ? 0 : getOneClassifyId().hashCode());
        result = prime * result + ((getSecClassifyId() == null) ? 0 : getSecClassifyId().hashCode());
        result = prime * result + ((getAssetNumber() == null) ? 0 : getAssetNumber().hashCode());
        result = prime * result + ((getAssetState() == null) ? 0 : getAssetState().hashCode());
        result = prime * result + ((getAddress() == null) ? 0 : getAddress().hashCode());
        result = prime * result + ((getAdminDep() == null) ? 0 : getAdminDep().hashCode());
        result = prime * result + ((getPaymentTime() == null) ? 0 : getPaymentTime().hashCode());
        result = prime * result + ((getOriginalValue() == null) ? 0 : getOriginalValue().hashCode());
        result = prime * result + ((getNetValue() == null) ? 0 : getNetValue().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", monadId=").append(monadId);
        sb.append(", assetName=").append(assetName);
        sb.append(", speModels=").append(speModels);
        sb.append(", oneClassifyId=").append(oneClassifyId);
        sb.append(", secClassifyId=").append(secClassifyId);
        sb.append(", assetNumber=").append(assetNumber);
        sb.append(", assetState=").append(assetState);
        sb.append(", address=").append(address);
        sb.append(", adminDep=").append(adminDep);
        sb.append(", paymentTime=").append(paymentTime);
        sb.append(", originalValue=").append(originalValue);
        sb.append(", netValue=").append(netValue);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}